package com.sinosoft.demo2;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class MySQLConnectionTest {
    public static void main(String[] args) {
        // 数据库连接信息
        String url = "jdbc:mysql://10.146.36.4:3306/6icustomer?useSSL=false&serverTimezone=UTC";
        String username = "6icustomer";
        String password = "Sgec4#Dh";

        // 尝试连接数据库
        try {
            Connection connection = DriverManager.getConnection(url, username, password);
            System.out.println("连接成功！");
        } catch (SQLException e) {
            System.out.println("连接失败: " + e.getMessage());
            e.printStackTrace();
        }
    }

}